* Cleaned data from the the parental questionannaire at 16

* Parentaal responses at 16
use "Data/NCDS/UKDA-5565-stata11/stata11/ncds0123.dta", clear
label variable n2411 "3P Hopes childs 1st job-job description"
label variable n2412 "3P Expect chlds 1st job - crtnty of ans"
label variable n2414 "3P Expect chlds 1st job-job description"

qui ds, not(varl "ncdsid serial number"|varl "3P *")
drop `r(varlist)'

rename ncdsid  NCDSID  

local a P16

********************************************************************************
* Parent's preferred first job 
********************************************************************************

rename  n2410 Pref1stJob_`a'
recode Pref1stJob_`a' (-1 8 9 =.) (0 7=5)
replace Pref1stJob_`a'=6 if n2411==17 /* reallocate sports*/

ta Pref1stJob_`a', gen(IPref1stJob_`a')
rename IPref1stJob_`a'* IPref1stJob*_`a'

********************************************************************************
* Parent's expected first job 
********************************************************************************

rename  n2413  Exp1stJob_`a'
recode Exp1stJob_`a' (-1 8 9 =.) (0 7=5)
replace Exp1stJob_`a'=6 if n2414==17 /* reallocate sports*/ 

ta Exp1stJob_`a', gen(IExp1stJob_`a')
rename IExp1stJob_`a'* IExp1stJob*_`a'

********************************************************************************
* Finish up
********************************************************************************

keep NCDSID *_`a'
sort NCDSID

save scratchdata/ncds_parental16.dta, replace


